// 导入request
import request from '../utils/request'

const getArticleDetail = ({ id }) => {
  return request({
    url: '/v1_0/articles/' + id,
    method: 'get'
  })
}
// 关注
const followUser = ({ target }) => {
  return request({
    url: '/v1_0/user/followings',
    method: 'post',
    data: {
      target
    }
  })
}
// 取消关注
const unfollowUser = ({ target }) => {
  return request({
    url: '/v1_0/user/followings/' + target,
    method: 'delete'
  })
}

// 暴露出去
export { getArticleDetail, followUser, unfollowUser }
